@echo off
set svn_path=%1
set local_path=%2
set git_path=%3
set git_branch_name=%4
set cp=%~dp0
svn co %svn_path% %local_path%
if %errorlevel% equ 1 (
    echo svn co %svn_path% %local_path% ERROR
    goto :exit
)
copy %cp%\_.gitignore_ %local_path%\.gitignore
if %errorlevel% equ 1 (
    echo copy %cp%\_.gitignore_ %local_path%\.gitignore ERROR
    goto :exit
)
cd /d %local_path%
if %errorlevel% equ 1 (
    echo cd %local_path% ERROR
    goto :exit
)
git init
git remote add origin %git_path%
git add .
git commit -m "Initial commit"
git push -u origin master:%git_branch_name%

:exit
exit /b 0
